CloseSensor
Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor)
Contents
Syntax
CloseSensor(port)
CloseSensor(port, handle)
Description
CloseSensor(port) closes the sensor port opened by the Open... functions. The value port can be addressed by the symbolic constants SENSOR_1 , SENSOR_2, SENSOR_3 and SENSOR_4 analog to the labeling on the NXT Brick. Closing the light sensor deactives the active light mode (the red light is turned off), closing the Ultrasonic sensor stops sending out ultrasound.
The last optional argument can be a valid NXT handle. If none is specified, the default handle will be used (call COM_SetDefaultNXT to set one).
Examples
OpenLight(SENSOR_3, 'ACTIVE');
light = GetLight(SENSOR_3);
CloseSensor(SENSOR_3);
See also
NXT_SetInputMode, OpenLight, OpenSound, OpenSwitch, OpenUltrasonic, SENSOR_1, SENSOR_2, SENSOR_3, SENSOR_4
Signature
- Author: Linus Atorf, Alexander Behrens (see AUTHORS)
- Date: 2007/10/15
- Copyright: 2007-2008, RWTH Aachen University